Skip to content

Conversation

@mnoergaard
Copy link
Collaborator

@mnoergaard mnoergaard commented Nov 26, 2025

This PR addresses issue #184 and #177 by adding support for 1) using other reference PET images for e.g. co-registration, and 2) implementing an additional option for performing PET to anatomical co-registration using ANTs. It implements the possibility to use 'twa' which is a time-weighted average of the motion corrected PET data. Furthermore, it also allows the use of 'sum' which is a summed image across time for the motion corrected PET data. Finally, it also allows the use of 'first5min' which is the average of the first 5 minutes of PET data, representing a perfusion-like image. The default is still the template generated from the motion correction using mri_robust_template. Finally, the co-registration is optimized by added the robustfov functionality from FSL to the preprocessed T1w before co-registration. This is to avoid the inclusion of neck and shoulder that will ultimately impact the registration.

@codecov
Copy link

codecov bot commented Nov 26, 2025

Codecov Report

❌ Patch coverage is 89.91826% with 37 lines in your changes missing coverage. Please review.
✅ Project coverage is 81.13%. Comparing base (133526d) to head (4abf978).

Files with missing lines Patch % Lines
petprep/workflows/pet/fit.py 84.57% 14 Missing and 13 partials ⚠️
petprep/interfaces/reports.py 60.00% 3 Missing and 3 partials ⚠️
petprep/cli/parser.py 75.00% 1 Missing and 1 partial ⚠️
petprep/workflows/pet/registration.py 95.83% 1 Missing ⚠️
petprep/workflows/pet/tests/test_fit.py 99.25% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #185      +/-   ##
==========================================
+ Coverage   80.63%   81.13%   +0.49%     
==========================================
  Files          84       84              
  Lines        6512     6843     +331     
  Branches      657      694      +37     
==========================================
+ Hits         5251     5552     +301     
- Misses       1097     1111      +14     
- Partials      164      180      +16     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mnoergaard mnoergaard requested a review from aliswh November 26, 2025 13:33
@mnoergaard mnoergaard requested a review from mathesong November 30, 2025 19:38
@mnoergaard
Copy link
Collaborator Author

mnoergaard commented Dec 1, 2025

@mathesong - think this is ready for review. Will continue to do more testing locally on my end and test robustness/performance. We may want to consider making ants the default option for co-registration. WDYT? But this should go into a separate PR.

@mathesong
Copy link

Looks good to me!

I've been testing this over the weekend on my other dataset too, and unfortunately it's not a silver bullet. I still have failures in ~25%. Some overlapping from before, some not. So better than before, but not quite as robust as I had hoped. I then ran it with the hmc with a 2mm fwhm, and it's saved a few, but they're still causing issues. So I'm not really sure what the default ought to be if we still have issues :\

I suspect that the primary issue is that for this tracer, there's just so much uptake outside the brain in the PET, which makes things messy. There's got to be a solution somewhere...

@mnoergaard mnoergaard changed the title ENH: Add support for other petref images for registration ENH: Optimize co-registration of T1w to petref, and provide more options for petref generation Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants